package com.gadgets.framework.common.constant;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-09-12
 *
 */
public class GadgetsConstant {

    /**
     * 系统参数码
     */
    public static final class CM01_SYS_PARAM_CODE{
        /**
         * 系统是否校验登录权限
         */
        public static final String CM01_AUTHCHECK = "CM01_AUTHCHECK";
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-17
     *
     */
    public static class SESSION_CACHE_KEY{
        /**
         * 角色列表
         */
        public static final String ROLE_LIST = "roleList";
        /**
         * 用户信息
         */
        public static final String USER_INFO = "userInfo";
    }

    /**
     * 用户SessionId键
     */
    public static final String USER_SESSION_ID_KEY = "gadgetsSessionId";

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class NUMBER_CONSTANT{
        public static final int NUMBER_0 = 0;
        public static final int NUMBER_1 = 1;
        public static final int NUMBER_2 = 2;
        public static final int NUMBER_3 = 3;
        public static final int NUMBER_4 = 4;
        public static final int NUMBER_5 = 5;
        public static final int NUMBER_6 = 6;
        public static final int NUMBER_7 = 7;
        public static final int NUMBER_8 = 8;
        public static final int NUMBER_9 = 9;
        public static final String STR_NUMBER_0 = "0";
        public static final String STR_NUMBER_1 = "1";
        public static final String STR_NUMBER_2 = "2";
        public static final String STR_NUMBER_3 = "3";
        public static final String STR_NUMBER_4 = "4";
        public static final String STR_NUMBER_5 = "5";
        public static final String STR_NUMBER_6 = "6";
        public static final String STR_NUMBER_7 = "7";
        public static final String STR_NUMBER_8 = "8";
        public static final String STR_NUMBER_9 = "9";
        public static final String STR_CHARAT_Z = "Z";
    }

    public static class TIME_UNIT_CONSTANT{
        /**
         * 秒
         */
        public static final String SECOND = "s";
        /**
         * 分
         */
        public static final String MINITE = "m";
        /**
         * 小时
         */
        public static final String HOUR = "h";
    }

    public static class STR_TYPE_CONSTANT{
        /**
         * 布尔true字符串表示
         */
        public static final String BOOLEAN_TRUE_STR = "true";
        /**
         * 布尔false字符串表示
         */
        public static final String BOOLEAN_FLASE_STR = "false";
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class USER_TYPE {
        /**
         * 系统管理员
         */
        public static final String SYS_MANAGER = NUMBER_CONSTANT.STR_NUMBER_0;
        /**
         * 项目管理员
         */
        public static final String PROJECT_MANAGER = NUMBER_CONSTANT.STR_NUMBER_1;
        /**
         * 项目成员
         */
        public static final String PROJECT_MEMBER = NUMBER_CONSTANT.STR_NUMBER_2;
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class RESP_CODE{
        /**
         * 成功应答
         */
        public static final String SUCCESS_CODE = "0000000000";
        /**
         * 未知错误应答
         */
        public static final String NOT_KNOW_CODE = "0000999999";
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class CACHE_BLOCK{
        /**
         * 默认缓存区
         */
        public static final String DEFAULT = "defaultCache";
        /**
         * 业务缓存区
         */
        public static final String BUSI_CACHE = "busiCache";
        /**
         * 会话缓存区
         */
        public static final String SESSION_CACHE = "sessionCache";
        /**
         * IP黑名单信息
         */
        public static final String BLACK_IP_CACHE = "blackIpCache";
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class SEQUEUE_NAME_CONSTANT{
        /**
         * 默认序列
         */
        public static final String DEFAULT_SEQUEUE_NAME = "default";
        /**
         * 任务编号序列
         */
        public static final String TASK_NO = "taskNo";
    }

    /**
     * @author UncleXiu
     * @version V1.0.0
     * @data 2020-09-12
     *
     */
    public static class TASK_STATUS{
        /**
         * 初始化状态
         */
        public static final String INIT = NUMBER_CONSTANT.STR_NUMBER_0;
        /**
         * 执行中状态
         */
        public static final String EXCUTE = NUMBER_CONSTANT.STR_NUMBER_1;
        /**
         * 执行失败状态
         */
        public static final String EXCEPTION = NUMBER_CONSTANT.STR_NUMBER_2;
        /**
         * 执行成功状态
         */
        public static final String SUCCESS = NUMBER_CONSTANT.STR_NUMBER_3;
    }

    /**
     * 数据类型
     */
    public static final class VARIANCE_TYPE{
        /**
         * 字符串
         */
        public static final String VARCHAR = NUMBER_CONSTANT.STR_NUMBER_0;
        /**
         * 整形
         */
        public static final String INTEGER = NUMBER_CONSTANT.STR_NUMBER_1;
        /**
         * 数字型
         */
        public static final String NUMBER = NUMBER_CONSTANT.STR_NUMBER_2;
        /**
         * 对象
         */
        public static final String OBJECT = NUMBER_CONSTANT.STR_NUMBER_3;
    }

}
